package com.qutan.app.quartz.event;

import com.qutan.app.BootstrapQuartzApi;
import com.qutan.app.core.domain.Scene;
import org.springframework.context.ApplicationContext;
import redis.clients.jedis.JedisCluster;

import java.util.List;
import java.util.Map;

/**
 * Created by pengweiyuan on 6/17/16.
 */
public class TestEvent{

    public static void execute() {
        ApplicationContext applicationContext = BootstrapQuartzApi.applicationContext;

        JedisCluster jedisCluster = applicationContext.getBean("jedisClusterFactory", JedisCluster.class);

        Map<String, String> stringStringMap = jedisCluster.hgetAll(Scene.getRedisStoreKey(Scene.class));

        stringStringMap.forEach((s, s2) -> {
            System.err.println(s+"::"+s2);
          }
        );
    }
}
